package com.hightrast.service.compareToData.stage.impl;

import com.hightrast.service.api.entity.RastProductVariants;
import com.hightrast.service.compareToData.stage.EntityUpdater;
import com.hightrast.service.util.BaseEntityUtil;

/**
 *  商品变体 更新策略实现
 */
public class RastProductVariantUpdater implements EntityUpdater<RastProductVariants> {
    @Override
    public void updateEntity(RastProductVariants oldEntity, RastProductVariants newEntity) {
        oldEntity.setProductId(newEntity.getProductId());
        oldEntity.setTitle(newEntity.getTitle());
        oldEntity.setOption1(newEntity.getOption1());
        oldEntity.setOption2(newEntity.getOption2());
        oldEntity.setOption3(newEntity.getOption3());
        oldEntity.setFulfillmentService(newEntity.getFulfillmentService());
        oldEntity.setSku(newEntity.getSku());
        oldEntity.setImageId(newEntity.getImageId());
        BaseEntityUtil.update(oldEntity);
    }
}